<?php
ob_start();
session_start();
$_SESSION["admin"] = "1";
if (!isset($_SESSION["admin"]))
{
	ob_end_clean();
	ob_get_clean();
	header("HTTP/1.0 403 Forbidden");
	header("Content-Type: text/plain; charset=UTF-8");
	exit(0);
}
header("Content-Type: text/html; charset=UTF-8");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
<?php require("setup/setup.php") ?>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<form action="#" method="post" >
<br />
<h4 style="color:red">以下操作涉及到对数据库的操作,请慎重，<br /><br />万一操作不当会造成严重的后果，网站管理员，切记，切记！</h4>
<br />
<input type="submit" value="安装并初始化数据库" name="init"/><br /><br />
<input type="submit" value="清空并重新初始化数据库" name="update"/><br />
<?php
  if(isset($_POST["init"])){
    init();
  }
  else if(isset($_POST["update"])){
    update(); 
  }
?>
</form>
</body>
</html>
